From: Cosimo Cecchi Date: Sat, 16 Feb 2013 17:59:54 +0000 (-0500) Subject: viewSelector: make the old page fade-out optional X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4825 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5f3b04ecbd5b47a408243e85671ce48e3865bfb8;p=gnome-shell.git viewSelector: make the old page fade-out optional When leaving the overview, we don't want the old page to fade out, but we want to fade in the windows directly. https://bugzilla.gnome.org/show_bug.cgi?id=693974 --- diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js index de9237bea..9a06c5c76 100644 --- a/js/ui/viewSelector.js +++ b/js/ui/viewSelector.js @@ -169,7 +169,7 @@ const ViewSelector = new Lang.Class({ if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows()) Main.overview.fadeOutDesktop(); - this._showPage(this._workspacesPage); + this._showPage(this._workspacesPage, true); }, zoomFromOverview: function() { @@ -205,7 +205,10 @@ const ViewSelector = new Lang.Class({ return page; }, - _fadePageIn: function() { + _fadePageIn: function(oldPage) { + if (oldPage) + oldPage.hide(); + this.emit('page-empty'); this._activePage.show(); @@ -216,7 +219,7 @@ const ViewSelector = new Lang.Class({ }); }, - _showPage: function(page) { + _showPage: function(page, noFade) { if (page == this._activePage) return; @@ -224,19 +227,18 @@ const ViewSelector = new Lang.Class({ this._activePage = page; this.emit('page-changed'); - if (oldPage) + if (oldPage && !noFade) Tweener.addTween(oldPage, { opacity: 0, time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME / 2, transition: 'easeOutQuad', onComplete: Lang.bind(this, function() { - oldPage.hide(); - this._fadePageIn(); + this._fadePageIn(oldPage); }) }); else - this._fadePageIn(); + this._fadePageIn(oldPage); }, _a11yFocusPage: function(page) {